<div class="col-md-12 search-box m-b-md">
	<div class="legend">查询条件</div>
	<div class="search-content">
		<div class="form-group">
			<label class="control-label">设备名称：</label>
			<input type="text" class="form-control" ng-model="$parent.name" placeholder="请输入设备名称"/>
		</div>
		<div class="form-group">
			<label class="control-label">设备类别：</label>
			<select class="form-control" ng-model="$parent.type">
				<option value="">全部</option>
				<option ng-repeat="(key,item) in typeData" value="{{key}}" ng-bind="item"></option>
			</select>
		</div>
		<div class="form-group">
			<label class="control-label">机器IP：</label>
			<input type="text" class="form-control" ng-model="$parent.managerIp" placeholder="请输入机器IP"/>
		</div>
	</div>
	<div class="search-btn">
		<button class="btn btn-primary w-xs m-r" ng-click="search()"><i class="fa fa-search"></i> 查询</button>
		<button class="btn btn-success w-xs m-r" ng-click="reset()"><i class="fa fa-refresh"></i> 重置</button>
		<button class="btn btn-info w-xs m-r" ng-click="goAction(1,row.id)"><i class="fa fa-plus"></i> 新增</button>
		<button class="btn btn-danger w-xs m-r" ng-click="batch1($event,3)" ng-disabled="$parent.isBatch1"><i class="fa fa-trash-o"></i> 批量删除</button>
		<button class="btn btn-success w-xs m-r" ng-click="batch1($event,1)" ng-disabled="$parent.isBatch1"><i class="fa fa-play"></i> 批量启动</button>
		<button class="btn btn-primary w-xs" ng-click="batch1($event,2)" ng-disabled="$parent.isBatch1"><i class="fa fa-stop"></i> 批量停止</button>
	</div>
</div>
<div class="col-md-12">
	<div class="table-responsive">
		<table class="table b-light m-b-xxs">
			<thead class="table-header" >
			<tr>
				<th width="5%" class="font-15 text-center">
					<label class="i-checks m-b-none"><input type="checkbox" ng-model="$parent.selectAll1" ng-click="chooseAll1()"><i></i></label>
				</th>
				<th width="15%" class="font-15 text-center">名称</th>
				<th width="15%" class="font-15 text-center">IP</th>
				<th width="15%" class="font-15 text-center">机房</th>
				<th width="15%" class="font-15 text-center">机柜</th>
				<th width="20%" class="font-15 text-center">型号</th>
				<!--<th class="text-center">拥有者</th>-->
				<!--<th class="text-center">是否可用</th>-->
				<th width="15%" class="font-15 text-center">操作</th>
			</tr>
			</thead>
			<tbody>
			<tr ng-repeat="(key,row) in serverListData">
				<td width="5%" class="font-15 text-center ">
					<label class="i-checks m-b-none"><input type="checkbox" ng-model="row.isSelect" ng-click="choose1()"><i></i></label>
				</td>
				<td width="15%" class="font-15 text-center text-info text-overflow detail-href" style="max-width:162px;" ng-bind="row.name" ng-click="detail($event,row.id)"></td>
				<td width="15%" class="font-15 text-center text-overflow" style="max-width:162px;" ng-bind="row.managerIp||row.serviceIp"></td>
				<td width="15%" class="font-15 text-center text-overflow" style="max-width:161px;" ng-bind="row.roomname"></td>
				<td width="15%" class="font-15 text-center text-overflow" style="max-width:161px;" ng-bind="row.rackname"></td>
				<td width="20%" class="font-15 text-center text-overflow" style="max-width:214px;" ng-bind="row.version"></td>
				<!--<td class="text-center" ng-bind="row.tenantName"></td>-->
				<!--<td class="text-center" ng-bind="row.tenantId|infrastructure"></td>-->
				<td width="15%" class="font-15 text-center">
					<div class="btn-group dropdown table-operation" dropdown="">
						<a class="btn btn-info btn-addon" dropdown-toggle=""><i class="fa fa-reorder" ></i>操作</a>
						<ul class="dropdown-menu">
							<li ng-if="row.status == 'STOPPED'" ng-click="commendAction(row,1)"><a href="">启动</a></li>
							<li ng-if="row.status == 'RUNNING'||row.status == 'EXCEPTION'" ng-disabled="row.status == 'EXCEPTION'" ng-click="commendAction(row,2)"><a href="">停止</a></li>
							<li ng-click="goAction(2,row.id)"><a href="">编辑</a></li>
							<li ng-click="delServer(row)" ><a href="">删除</a></li>
						</ul>
					</div>
					<!--<div class="btn-group dropdown table-operation" dropdown="">-->
					<!--<a class="btn btn-info btn-addon" dropdown-toggle=""><i class="fa fa-reorder" ></i>操作</a>-->
					<!--<ul class="dropdown-menu">-->
					<!--<li ng-click="recover(row.id)"><a href="">回 收</a></li>-->
					<!--<li ng-click="allocate(row.id)" ><a href="">分 配</a></li>-->
					<!--</ul>-->
					<!--</div>-->
				</td>
			</tr>
			</tbody>
		</table>
		<div class="clearfix">
			<div class="col-sm-6">
				<div class="paginationTables_info">共有<span ng-bind="$parent.totalCount"></span>条记录，每页显示<span
						ng-bind="param.rows"></span>条
				</div>
			</div>
			<div class="col-sm-6 text-right">
				<pagination boundary-links="true" total-items="$parent.totalCount" items-per-page="param.rows" max-size="10"
							ng-model="param.page" ng-change="getList(param.page)" previous-text="&lsaquo;"
							next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></pagination>
			</div>
		</div>
	</div>
	<div data-ng-include="'/statics/tpl/assets/infrastructure/detail.html'"></div>
</div>
